﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using MoiGioiHDBank.DTO;
using MoiGioiHDBank.DAO;

namespace MoiGioiHDBank
{
    public partial class TrangDangNhap : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btLogin_Click(object sender, EventArgs e)
        {
            Users us = UsersDAO.LayThongTinUser(tbUserName.Text, tbPassword.Text);
            if (us == null)
            {
                return;
            }
            else
            {
                Session["users"] = us;
                Response.Redirect("Default.aspx");
            }
        }
    }
}